package com.lk.car.service.impl;

import com.lk.car.domain.CarResources;
import com.lk.car.mapper.CarResourcesMapper;
import com.lk.car.service.ICarResourcesService;
import com.lk.basic.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lk
 * @since 2022-11-04
 */
@Service
public class CarResourcesServiceImpl extends BaseServiceImpl<CarResources> implements ICarResourcesService {

    @Autowired
    private CarResourcesMapper carResourcesMapper;
    @Override
    public void save(CarResources carResources) {
        carResourcesMapper.deleteByCarId(carResources.getCarId());
        super.insert(carResources);

    }
}
